<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
</head>
<body>
    
    <div id="app">
        <div>方法：{{method1()}}</div>
        <div>属性：{{computed1}}</div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.js"></script>
    <script type="text/javascript">
        var vm = new Vue({
            el:"#app",
            data: {
                
            },
            methods: {
                method1:function() {
                    return Date.now();//返回一个时间戳 
                }
            },
            computed: {//计算属性
                computed1:function(){
                    return Date.now();//返回一个时间戳
                }
                
            }
        });
    </script>
</body>
</html>